
// 获取mapbox地图服务token
const getMapboxToken = () => {
  let tokens = [
    "pk.eyJ1Ijoic2hpd2IiLCJhIjoiY2t4NHEycHM3MmF3ZzJxcXJyNW1mdXh2cCJ9.Sf64I3o1xiJqqZCR9h229w",
    "pk.eyJ1Ijoic2hpd2IiLCJhIjoiY2t4NHEyeWplMmI4YTMwbXRvdjNkNmI1OSJ9.FBvo0c2z8VaThtG2Om30AA",
    "pk.eyJ1Ijoic2hpd2IiLCJhIjoiY2t4NHEzNmVkMjNwNjJ2cTNlcmJzYW1mYSJ9.Dv6vEN4rPLbgKBMTjGpoIQ",
    "pk.eyJ1Ijoic2hpd2IiLCJhIjoiY2t4NHEzZWZpMmFwazJwcW84MHQ3NDJ3NyJ9.59HxmlsHxmsBdxoZ0Taiiw",
    "pk.eyJ1Ijoic2hpd2IiLCJhIjoiY2t4NHEwd3U4MWtubjJucG4xdGt5cGY4YSJ9.8GUgipk6QCRQv1kpLV7p9A",
  ];
  return tokens[Math.floor(Math.random() * 5)];
}
let config = {
  defaultToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhNDQxMzcxYi0zNTIxLTQwOWEtOTVjOC05ZDQ0NzE0YjM0OWIiLCJpZCI6OTAxNywiaWF0IjoxNjg3NzY1MDczfQ.KjfOTcdJSsMU9wZu8cUgfYg8-0JsWn5H6slw6S-3Q7M",
  mapOption: {
    lng: 113.55661,
    lat: 34.819168,
    heading: 0,
    pitch: -45,
    distance: 2000,
    // minDistance: 1, //默认为15
    // maxDistance: 15000
  },
  // projection: "WebMercator", //设置地图坐标系，Geographic：地理坐标系、WebMercator：平面坐标系，默认Geographic
  isTerrain: false, //是否添加默认地形
  sceneMode: 3, // 场景模式：1、3D平面模式 2、2D模式 3、3D模式，默认3D模式
  baseLayer: {
    type: "UrlTemplate",
    url: "https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
    // url: "http://wprd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=6&x={x}&y={y}&z={z}",
    // sr: "GCJ02",
    minimumLevel: 0,
    maximumLevel: 18,
    // Mapbox添加方式特殊
    // type: "Mapbox",
    // mapId: "mapbox.satellite",
    // accessToken: getMapboxToken()
  },
}
export default config;